package shared;

public class Timer {
	private int maxTime;
	private int currentTime;
	
	public Timer(double time) {
		maxTime = (int)(time * 60.0);
		currentTime = maxTime;
	}
	
	public boolean update() {
		if(currentTime < maxTime) {
			currentTime++;
			return false;
		} else {
			return true;
		}
	}
	
	public void setTimer(double time) {
		maxTime = (int)(time * 60.0);
		currentTime = maxTime;
	}
	
	public void resetTimer() {
		currentTime = 0;
	}
}
